interface responseData {
  code: number,
  ok: boolean,
  message: string
}

export interface spuListAPIParamsType {
  page: string | number,
  limit: string | number,
  category3Id: string | number,
}

// 获取spu数组数据的接口类型
export interface spuResponseDataRecordsType {
	id: number | string;
	createTime?: string;
	updateTime?: string;
	spuName: string;
	description: string;
	category3Id: number | string;
	tmId?: number | string;
	spuSaleAttrList?: any;
	spuImageList?: any;
	spuPosterList?: any;
}
export interface spuResponseDataType {
	records: spuResponseDataRecordsType[];
	total: number;
	size: number;
	current: number;
	orders: any[];
	optimizeCountSql: boolean;
	hitCount: boolean;
	countId?: any;
	maxLimit?: any;
	searchCount: boolean;
	pages: number;
}
export interface spuResponseType extends responseData {
  data: spuResponseDataType
}

// spu品牌数据类型
export interface spuTrademarkItemType {
  id: number|string;
  tmName: string;
  logoUrl: string;
}
export interface spuResponseTrademarkType extends responseData {
  data: spuTrademarkItemType[]
}

// spu照片墙数据类型
export interface spuImageItemType {
  id?: string | number,
  createTime?: string,
  updateTime?: string,
  spuId?: string | number,
  imgName: string,
  name?: string,
  imgUrl: string,
  url?: string,
}
export interface spuResponseImageType extends responseData {
  data: spuImageItemType[]
}

// spu已有的销售属性
export interface spuSaleAttrValueListType {
  id?: string | number,
  createTime?: string,
  updateTime?: string,
  spuId?: string | number,
  baseSaleAttrId: string | number,
  saleAttrValueName: string,
  saleAttrName?: string,
  isChecked?: boolean | null,
}
export interface spuSaleItemType {
  id?: string | number,
  createTime?: string,
  updateTime?: string,
  baseSaleAttrId: string | number,
  spuId?: string | number,
  saleAttrName: string,
  spuSaleAttrValueList: spuSaleAttrValueListType[],
  flag?: boolean,
  saleAttrValue?: string,
}
export interface spuResponseSaleType extends responseData {
  data: spuSaleItemType[]
}

// spu所有的销售属性
export interface spuAllSaleItemType {
  id: string | number,
  name?: string,
}
export interface spuResponseAllSaleType extends responseData {
  data: spuAllSaleItemType[]
}

// 更新、添加spu的类型
export interface spuDataType {
  id?: number | string,
  spuName: string,
  tmId?: string | number,
  category3Id: string | number,
  description: string,
  spuImageList?: spuImageItemType[],
  spuSaleAttrList?: spuSaleItemType[],
}
